package com.company;

import java.util.Map;

public class Test1 {

    public static void main(String[] args) {
        String result = "1949";
        for(int i =1; i <= 2016; i++){
            int di = Integer.parseInt(result.substring(result.length()-2, result.length()));
            result = String.valueOf((int)Math.pow(di, i));
        }
        System.out.println(result);
    }

}
